#include<iostream>
using namespace std;
#include<unistd.h>
#include<sys/types.h>
#include<signal.h>

void myhander(int signum)
{
  cout << "signal is : " << signum << endl;
}


int main()
{
  for (int i = 1; i <= 31; i++) 
  {
    signal(i, myhander);
  }
  while (true)
  {
    cout << "i am a process,  pid : " << getpid() << endl;
    sleep(1);
  }
  return 0;
}

